package edu.ccut.saturn.basecomponent.database.impl.db2.builder;

import edu.ccut.saturn.basecomponent.database.ISaturnSQL;
import edu.ccut.saturn.basecomponent.database.SaturnSQLBuilderFactory;
import edu.ccut.saturn.basecomponent.database.impl.AbstractInsertSQLBuilder;
import edu.ccut.saturn.component.IDataItem;

public class DB2InsertLOBSQLBuilder extends AbstractInsertSQLBuilder {

	@Override
	protected String getColumnValueString(IDataItem iDataItem, Object value) {
		return "?,";
	}
    
	@Override
	protected String getPrimerKeySql(IDataItem dataItem) {
		return "SELECT nextval for " + dataItem.getSequenceName() + " primaryKey  from sysibm.sysdummy1 ";
	}

	@Override
	protected String getDatabaseType() {
		return SaturnSQLBuilderFactory.DB2;
	}

	@Override
	protected String getOperationType() {
		return ISaturnSQL.INSERT_LOB_OPERATION;
	}

}
